---
import useIcon from "@/hooks/useIcon";
export interface Props {
  size?: "small" | "large";
  id: string;
}

const { size, id } = Astro.props;
const icon = useIcon(id);
---

{
  icon ? (
    <img
      class="!bg-transparent"
      src={size === "large" ? icon.largeIcon : icon.smallIcon}
      alt={icon.name}
    />
  ) : (
    "未找到物品！"
  )
}
